import React, {useEffect} from "react";
import {NavLink} from "react-router-dom";

const Home: React.FC = () => {
    const [count, setCount] = React.useState<number>(0)

    useEffect(() => {
    }, []);

    return (
        <div style={{display: 'flex', flexDirection: 'column', alignItems: 'center'}}>
            <h1>Hello,React!</h1>
            <p>You clicked {count} times</p>
            <button onClick={() => setCount(count + 1)}>点击我</button>
            <br/>
            <NavLink to={'/test'}>Test</NavLink>
        </div>
    )
}


export default Home;